package com.newasia.management.dto.productCategory;

import com.newasia.commons.result.AbstractRequest;
import com.newasia.commons.tool.exception.ValidateException;
import com.newasia.management.constants.ManagementRetCode;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * 腾讯课堂搜索【咕泡学院】
 * 官网：www.gupaoedu.com
 * 风骚的Mic 老师
 * create-date: 2019/7/31-19:21
 */
@Data
public class CreateItemCatRequest extends AbstractRequest {

    private Long parentId;

    private String catName;

    private Integer status;

    private Integer sortOrder;

    private Boolean isParent;

    private String icon;

    private String remark;

    @Override
    public void requestCheck() {
        if(catName==null||status==null||sortOrder==null||parentId==null){
            throw new ValidateException(
                    ManagementRetCode.REQUISITE_PARAMETER_NOT_EXIST.getCode(),
                    ManagementRetCode.REQUISITE_PARAMETER_NOT_EXIST.getMessage());
        }
    }
}
